home *** CD-ROM | disk | FTP | other *** search
/ The Best of Select: Games Special 15 / TboS Games Special 15.iso / xtra / rar155 / sfx.doc < prev    next >
Text File  |  1995-08-19  |  23KB  |  629 lines

  1.  
  2.  ██████╗   █████╗  ██████╗      RAR version 1.55
  3.  ██╔══██╗ ██╔══██╗ ██╔══██╗     ~~~~~~~~~~~~~~~~
  4.  ██████╔╝ ███████║ ██████╔╝     Multifunctional Integrated Archive Manager
  5.  ██╔══██╗ ██╔══██║ ██╔══██╗     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6.  ██║  ██║ ██║  ██║ ██║  ██║     The Installation SFX for DOS User's Manual
  7.  ╚═╝  ╚═╝ ╚═╝  ╚═╝ ╚═╝  ╚═╝     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  8.  
  9.  
  10.    1. SFX functionality overview.
  11.  
  12.    The SFX (SelF-eXtracting module) is the archive module used to extract
  13.    files when executed. It is in the form of a normal executable file.
  14.  
  15.    The RAR Archiver offers SFX-functionality which is significantly
  16.    enhanced over common SFX, as well as the possibility to create an SFX
  17.    archive, with an alternate SFX module from an external file.
  18.  
  19.    The alternate SFX module can be created by using the switch
  20.    '-sfx[<sfxfile>]' or the command 's[<sfxfile>]' when, in the optional
  21.    parameter <sfxfile>, you indicate the required SFX executable module.
  22.  
  23.    Several RAR SFX executable modules are currently available:
  24.       - the common SFX for DOS (default in the DOS version, file dos.sfx);
  25.       - the Installation SFX for DOS (file idos.sfx);
  26.       - the common SFX for OS/2 (default in the OS/2 version, file os2.sfx).
  27.  
  28.    In fact you may add your own RAR SFX executable module using unRAR
  29.    sources (e.g. for your particular OS or special needs).
  30.  
  31.  
  32.    2. The Installation SFX.
  33.  
  34.    As an alternative to the default SFX you may build an Installation
  35.    SFX which uses a powerful script language, providing original features:
  36.  
  37.      - fully configurable, friendly, menu-driven interface;
  38.      - check for free disk space before installation;
  39.      - request destination path to which to install files;
  40.      - installation status - file extraction progress bar,
  41.        completed percentage and other features.
  42.  
  43.    The Installation Script is a plain ASCII text file, which may be prepared
  44.    using your favourite text editor.  The script is placed in the SFX 
  45.    archive comment to be processed by the Installation SFX module when it 
  46.    is executed.  For example, you may use the following command line to
  47.    create such an SFX archive: 
  48.  
  49.      rar a -sfxidos.sfx -zmyinst.s minstall
  50.  
  51.    Where 'idos.sfx' is the pathname of Installation SFX module and the file
  52.    myinst.s is the text file containing your installation script.
  53.  
  54.    The Installation SFX contains build-in interpreter of the Script
  55.    Language.
  56.  
  57.  
  58.    2.1 Installation Script Language
  59.  
  60.    As a program language the script contains the following objects:
  61.  
  62.      Command    statement initiating an action;
  63.  
  64.      Procedure  commands defined apparently to be called from the main
  65.                 script code;
  66.  
  67.      Function   built-in procedure which returns a value;
  68.  
  69.      Constant   character string or a numeric value (4 bytes length);
  70.  
  71.      Variable   name defining a storage place for a value.
  72.  
  73.    Variables may be assigned a numeric value or a character string.
  74.    All variables are global, meaning once defined the variable is the
  75.    same within the main code and all procedures.
  76.  
  77.    Variable and procedure names are case-sensitive.
  78.    Command statements are case-insensitive.
  79.  
  80.    Command and built-in procedures may be called with parameters -
  81.    constants and variables.  Expressions may not be used as parameters.
  82.  
  83.  
  84.    2.1.1. Control commands
  85.  
  86.    CALL        Initiate a procedure call:
  87.  
  88.                CALL <ProcName>
  89.  
  90.                <ProcName> is the procedure name (defined with PROC).
  91.  
  92.  
  93.    DELAY       Suspend script execution:
  94.  
  95.                DELAY [<ms>]
  96.  
  97.                <ms> is the delay interval (milliseconds).  If the interval
  98.                is ommited, an infinite interval will be set.  Execution
  99.                continues following a key press or mouse click.
  100.  
  101.  
  102.    EXCLUDE     Define the list of files NOT to be extracted from the archive
  103.                while installing:
  104.  
  105.                EXCLUDE [ <File1> [, <File2>..] ]
  106.  
  107.                <File1>, <File2>.. are variables or character strings
  108.                containing the names of files to be excluded.  Wildcards are
  109.                permitted.
  110.  
  111.                The initial value of this file list is "", meaning "no files
  112.                to exclude".  EXCLUDE without any parameters would restore the
  113.                initial value of the file list.
  114.  
  115.  
  116.    EXIT        Terminate the Installation SFX:
  117.  
  118.                EXIT <Code>
  119.  
  120.                SFX exits with errorlevel = <Code>.
  121.  
  122.  
  123.    GOTO        Transfer control to a string in the script, identified
  124.                by a label:
  125.  
  126.                GOTO <Label>
  127.  
  128.                <Label> is the name in the script followed by a colon ':'
  129.                character.  For example:
  130.  
  131.                GOTO Menu
  132.                ...
  133.                Menu:
  134.  
  135.  
  136.    IF          Conditionally execute commands:
  137.  
  138.                IF <Var> <?> <Value>
  139.                      <commands>
  140.                      ...
  141.                ENDIF
  142.  
  143.                Control flow statement that defines conditional execution of
  144.                the statements within the block IF...ENDIF structure.  <Var>
  145.                is a variable to be compared with the <Value> using a single
  146.                comparison operator, if the result of the comparison is TRUE
  147.                then the statements within the IF...ENDIF are executed.
  148.  
  149.                Comparison operators are:-
  150.  
  151.                '=='  ..  EQUAL TO
  152.                '!='  ..  NOT EQUAL TO
  153.                '>'   ..  GREATER THAN
  154.                '>='  ..  GREATER THAN OR EQUAL TO
  155.                '<'   ..  LESS THAN
  156.                '<='  ..  LESS THAN OR EQUAL TO
  157.  
  158.                <Value> is a constant or variable.
  159.                Character values may be compared using only the '==' or '!='
  160.                comparison operations.
  161.  
  162.  
  163.    INCLUDE     Define the list of files to be extracted from the archive
  164.                while installing:
  165.  
  166.                INCLUDE [ <File1> [, <File2>..] ]
  167.  
  168.                <File1>, <File2>.. are variables or character strings
  169.                containing the names of files to be extracted. Wildcards 
  170.                permitted.
  171.  
  172.                The initial value of this file list is "*.*" meaning
  173.                "all files in the archive".  The first INCLUDE defined will
  174.                replace the default value with the specified value.  All 
  175.                further INCLUDE's will add file names to the list without 
  176.                removing previous values.
  177.                To clear all the file names in the INCLUDE list, give the 
  178.                INCLUDE statement without parameters.
  179.  
  180.  
  181.    INSTALL     Begin installation.  If no INSTALL statement is given,
  182.                installation will begin when the end of main script code
  183.                is reached.
  184.  
  185.  
  186.    OVERWRITE   Set overwrite mode when extracting archived files:
  187.  
  188.                OVERWRITE { ON | OFF | FRESH | UPDATE }
  189.  
  190.                ON      always overwrite existing files
  191.                OFF     never overwrite existing files
  192.                FRESH   only overwrite files which exist in the destination
  193.                        directory and are newer in the archive
  194.                UPDATE  As for FRESH but also extract files which do not 
  195.                        exist in the destination directory
  196.  
  197.  
  198.    PROC        Define a procedure:
  199.  
  200.                PROC <ProcName>
  201.                     <commands here>
  202.                     ...
  203.                ENDP
  204.  
  205.                <ProcName> is the procedure name.  May be called with the
  206.                CALL statement - commands between PROC and ENDP would be
  207.                processed.
  208.  
  209.  
  210.    SOUND       Produce sounds on the PC speaker:
  211.  
  212.                SOUND <F1>, <D1> [, <F2>, <D2>...]
  213.  
  214.                <F1> is frequency and <D1> - duration in milliseconds of
  215.                produced beep. You may produce as many notes as required
  216.  
  217.  
  218.    SYSTEM      Issue an OS command:
  219.  
  220.                SYSTEM <Arg1> [, <Arg2>..]
  221.  
  222.                The command line merged from parameters <Arg1>, <Arg2>...
  223.                is executed.
  224.  
  225.    ;